package com.example.demo.entity;

import java.time.LocalDateTime;

public class DataSourceConfig {
    private Long id;                        // 主键ID
    private String name;                    // 数据源名称，如：用户库-生产环境
    private String dbType;                  // 数据库类型：MySQL, PostgreSQL
    private String host;                    // 主机地址
    private Integer port;                   // 端口号
    private String username;                // 用户名
    private String passwordEncrypted;       // 加密后的密码
    private String databaseName;            // 数据库名称
    private String querySql;                // 用于获取数据的查询SQL
    private String idFields;                // 用于生成任务唯一ID的源字段数组，JSON格式
    private String displayFields;           // 需要在前端展示的列名数组，JSON格式
    private String extraFields;             // 需要额外添加的字段，JSON格式
    private Integer status;                 // 1=启用，0=禁用
    private LocalDateTime createdAt;        // 创建时间
    private LocalDateTime updatedAt;        // 更新时间
    
    // Getters and Setters
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getDbType() {
        return dbType;
    }
    
    public void setDbType(String dbType) {
        this.dbType = dbType;
    }
    
    public String getHost() {
        return host;
    }
    
    public void setHost(String host) {
        this.host = host;
    }
    
    public Integer getPort() {
        return port;
    }
    
    public void setPort(Integer port) {
        this.port = port;
    }
    
    public String getUsername() {
        return username;
    }
    
    public void setUsername(String username) {
        this.username = username;
    }
    
    public String getPasswordEncrypted() {
        return passwordEncrypted;
    }
    
    public void setPasswordEncrypted(String passwordEncrypted) {
        this.passwordEncrypted = passwordEncrypted;
    }
    
    public String getDatabaseName() {
        return databaseName;
    }
    
    public void setDatabaseName(String databaseName) {
        this.databaseName = databaseName;
    }
    
    public String getQuerySql() {
        return querySql;
    }
    
    public void setQuerySql(String querySql) {
        this.querySql = querySql;
    }
    
    public String getIdFields() {
        return idFields;
    }
    
    public void setIdFields(String idFields) {
        this.idFields = idFields;
    }
    
    public String getDisplayFields() {
        return displayFields;
    }
    
    public void setDisplayFields(String displayFields) {
        this.displayFields = displayFields;
    }
    
    public String getExtraFields() {
        return extraFields;
    }
    
    public void setExtraFields(String extraFields) {
        this.extraFields = extraFields;
    }
    
    public Integer getStatus() {
        return status;
    }
    
    public void setStatus(Integer status) {
        this.status = status;
    }
    
    public LocalDateTime getCreatedAt() {
        return createdAt;
    }
    
    public void setCreatedAt(LocalDateTime createdAt) {
        this.createdAt = createdAt;
    }
    
    public LocalDateTime getUpdatedAt() {
        return updatedAt;
    }
    
    public void setUpdatedAt(LocalDateTime updatedAt) {
        this.updatedAt = updatedAt;
    }
}